import service from "../index";

export const getShopCar = (data) => {
    return service({
        method:'POST',
        url:'/p/shopCart/info',
        data
    })

  return new Promise((res) => {
    res({
      code: 200,
      data: [
        {
          shopName: "圣罗兰口红官方旗舰店",
          shopList: [
            {
              check: false,
              imgUrl: "xxxxx",
              title: "圣罗兰口红官方旗舰店圣罗兰口红官方旗舰店",
              num: 10,
              price: 12,
              message: "三套",
            },
            {
              check: true,
              imgUrl: "xxxxx",
              title: "圣罗兰口红官方旗舰店圣罗兰口红官方旗舰店",
              num: 10,
              price: 12,
              message: "三套",
            },
          ],
        },
        {
          shopName: "圣罗兰口红官方旗舰店",
          shopList: [
            {
              check: true,
              imgUrl: "xxxxx",
              title: "圣罗兰口红官方旗舰店圣罗2兰口红官方旗舰店",
              num: 1,
              price: 1221,
              message: "三套",
            },
          ],
        },
      ],
    });
  });
};



export const recommendList = (data) => {
    //   return service({
    //       method:'POST',
    //       url:'/aps/project/queryProjectInfo',
    //       data
    //   })
  
    return new Promise((res) => {
      res({
        code: 200,
        data: [
          {
            imgUrl:
              "https://img30.360buyimg.com/jdcms/s460x460_jfs/t1/239786/19/4948/216067/65d887c1Fb10f5e15/36f4ac66a0b1f530.jpg.avif",
            goodsTitle: "【2包起包起包起包起购】松糕吃",
            goodsPrice: "13.0",
            goodsSold:132,
            shopName:'秋茗铁观音专卖店',
            tips:'年货',
          },
          {
            imgUrl:
              "https://img30.360buyimg.com/jdcms/s460x460_jfs/t1/239786/19/4948/216067/65d887c1Fb10f5e15/36f4ac66a0b1f530.jpg.avif",
            goodsTitle: "【2包起购】松糕吃",
            goodsPrice: "13.0",
            goodsSold:132,
            shopName:'秋茗铁观音专卖店',
           
          },
       
        ],
      });
    });
  };



  export const changeItem = (data) => {
      return service({
          method:'POST',
          url:'/p/shopCart/changeItem',
          data
      })
  
    
  };


  export const totalPay = (data) => {
    return service({
        method:'POST',
        url:'/p/shopCart/totalPay',
        data
    })

  
};


export const deleteItem = (data) => {
  return service({
      method:'DELETE',
      url:'/p/shopCart/deleteItem',
      data
  })


};


export const confirm = (data) => {
  return service({
      method:'POST',
      url:'/p/order/confirm',
      data
  })


};